﻿using System.Windows.Forms;

namespace ThreadSafeControls {
    public class ThreadSafeTextBox : ThreadSafeControl<TextBox> {

        internal ThreadSafeTextBox(TextBox textBox) : base(textBox) { }

        public void AppendText(string text) {
            UpdateAsync(c => c.AppendText(text));
        }

        public void Clear() {
            UpdateAsync(c => c.Clear());
        }

        public void ClearUndo() {
            UpdateAsync(c => c.ClearUndo());
        }

        public void Copy() {
            UpdateAsync(c => c.Copy());
        }

        public void Cut() {
            UpdateAsync(c => c.Cut());
        }

        public void Paste(string text) {
            UpdateAsync(c => c.Paste(text));
        }

        public void Paste() {
            UpdateAsync(c => c.Paste());
        }

        public void ResetText() {
            UpdateAsync(c => c.ResetText());
        }

    }
}
